package net.wanho.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.wanho.dto.ProductQueryDTO;
import net.wanho.po.Product;
import net.wanho.vo.ProductExportVo;
import net.wanho.vo.ProductVo;
import net.wanho.vo.ProductWarningVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 32033
 * @description 针对表【product(商品表)】的数据库操作Mapper
 * @createDate 2025-01-11 17:01:23
 * @Entity net.wanho.po.Product
 */
@Mapper
public interface ProductMapper extends BaseMapper<Product> {

    Page<ProductVo> selectByPage(Page<ProductVo> page, @Param("ew") QueryWrapper<ProductVo> wrapper);

    List<ProductExportVo> selectProductExportList(ProductQueryDTO exportDTO);

    Page<ProductWarningVO> selectOverdueWarningPage(Page<Product> page, @Param("ew") LambdaQueryWrapper<Product> wrapper);

    Product selectOneByName(@Param("productName") String productName, @Param("storeId") Integer targetStoreId);

    List<Integer> selectProductInvent();
}




